package com.fastjrun.share.demo.dao;

import com.fastjrun.share.demo.mapper.SysUserMapper;
import org.apache.ibatis.annotations.Update;

public interface SysUserDao extends SysUserMapper {

    /**
     * 修改密码
     *
     * @param userId      用户名
     * @param newPassword 新密码
     * @return
     */
    @Update({
            "update sys_user",
            "set password = #{newPassword,jdbcType=VARCHAR}",
            "where id = #{userId,jdbcType=BIGINT}"
    })
    int modifyPassword(Long userId, String newPassword);
}
